<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <jsp:include page="/static/common/common_header.jsp"/>
    <style>
        tr {
            color: #3c3c3c;
            font-family: Arial,"Microsoft YaHei","微软雅黑";
            font-size: 12px;
            font-style: normal;
        }
    </style>
    <script type="text/javascript" src="/static/plugins/artDialog/jquery.artDialog.source.js?skin=blue"></script>
    <script type="text/javascript" src="/static/plugins/artDialog/plugins/iframeTools.source.js"></script>
    <script type="text/javascript" src="/static/js/chart/losschart.js"></script>
    <script type="text/javascript">
        $(function(){
            //图表改变事件
            $(".chart").click(function () {
                var url = $(this).data("url");
                $.dialog.open(url+$("#searchForm").serialize(),{
                    id:"lossChartByLine",
                    title:"理赔报表"
                })
            })
        })
    </script>
</head>

<body>

        <table id="losschart_datagrid"></table>
        <div id="losschart_toolbar">
            <form id="searchForm">
                机构:<input id="safetymechanism" class="easyui-combobox"
                          data-options="url:'/safetymechanism/listAll.do',valueField:'id',textField:'name',panelHeight:'auto'"
                          name="safetymechanismId">
                理赔日期:<input id="beginDate" type="text" class="easyui-datebox" name="beginDate"/>
                ~ <input id="endDate" type="text" class="easyui-datebox" name="endDate"/>
                <br>
                <table>
                    <tr>
                        <td>分组:
                            <select id="groupType" class="easyui-combobox" data-options="panelHeight:'auto',width:118" name="groupType">
                                <option value="e.username">业务人员</option>
                                <option value="s.name">保险机构</option>
                                <option value="date_format(ac.visitDate,'%Y-%m')">理赔日期(月)</option>
                                <option value="date_format(ac.visitDate,'%Y-%m-%d')">理赔日期(日)</option>
                            </select>
                        </td>
                        <td width="30px"></td>
                        <td><a class="easyui-linkbutton chart" iconCls="icon-large-chart" plain="true"
                               data-url="/chart/listlossbyline?">柱状图</a>
                        <td width="30px"></td>
                        <td><a class="easyui-linkbutton chart" iconCls="icon-filter" plain="true"
                               data-url="/chart/listlossbypie?">饼状图</a>
                        </td>
                        <td width="30px"></td>
                        <td><a class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="doSearch()">查询</a></td>
                    </tr>
                </table>
            </form>
        </div>
</body>
</html>
